<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>相册详情 | 社交相册</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
  
  <style>
    :root {
      --primary: #4F46E5;
      --secondary: #6B7280;
      --light: #F9FAFB;
      --dark: #1F2937;
      --white: #FFFFFF;
      --border: #E5E7EB;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      --radius: 8px;
      
      /* 不同风格主题色 */
      --style1: #3B82F6; /* 科技蓝 */
      --style2: #EC4899; /* 活力粉 */
      --style3: #10B981; /* 生态绿 */
      --style4: #F59E0B; /* 温暖橙 */
      --style5: #8B5CF6; /* 梦幻紫 */
      --style6: #111827; /* 商务黑 */
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #f5f5f5;
      color: var(--dark);
      min-height: 100vh;
      padding: 0;
      margin: 0;
      transition: background-color 0.3s ease;
    }
    
    .container {
      max-width: 420px;
      margin: 0 auto;
      background-color: var(--white);
      min-height: 100vh;
      box-shadow: var(--shadow);
      overflow: hidden;
      position: relative;
      transition: background-color 0.3s ease;
    }
    
    /* 相册页面容器 */
    .album-page {
      display: none;
      min-height: 100vh;
      flex-direction: column;
    }
    
    .album-page.active {
      display: flex;
      animation: fadeIn 0.3s ease forwards;
    }
    
    /* 顶部导航栏 */
    .page-header {
      padding: 18px 20px;
      position: relative;
      text-align: center;
      border-bottom: 1px solid var(--border);
      background-color: var(--white);
      transition: all 0.3s ease;
      z-index: 10;
    }
    
    .page-title {
      font-size: 18px;
      font-weight: 600;
      margin: 0;
    }
    
    .header-actions {
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      gap: 15px;
    }
    
    .header-btn {
      background: none;
      border: none;
      color: var(--dark);
      font-size: 20px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .header-btn:active {
      transform: scale(0.9);
    }
    
    .back-btn {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: var(--dark);
      font-size: 20px;
      cursor: pointer;
    }
    
    /* 相册信息 */
    .album-info {
      padding: 15px 20px;
      border-bottom: 1px solid var(--border);
    }
    
    .album-title {
      font-size: 20px;
      font-weight: 600;
      margin-bottom: 8px;
    }
    
    .album-meta {
      display: flex;
      justify-content: space-between;
      color: var(--secondary);
      font-size: 14px;
      margin-bottom: 12px;
    }
    
    .album-description {
      font-size: 15px;
      line-height: 1.5;
      margin-bottom: 15px;
    }
    
    .album-owner {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    
    .owner-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background-color: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 600;
    }
    
    .owner-name {
      font-weight: 500;
      font-size: 15px;
    }
    
    /* 照片网格容器 */
    .photos-container {
      flex-grow: 1;
      overflow-y: auto;
    }
    
    /* 照片网格布局 */
    .photos-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 2px;
    }
    
    .photo-item {
      aspect-ratio: 1/1;
      background-color: #f0f0f0;
      background-size: cover;
      background-position: center;
      cursor: pointer;
      position: relative;
      transition: all 0.2s ease;
    }
    
    .photo-item:hover {
      opacity: 0.95;
    }
    
    .photo-item .photo-count {
      position: absolute;
      bottom: 5px;
      right: 5px;
      background-color: rgba(0, 0, 0, 0.5);
      color: white;
      font-size: 12px;
      padding: 2px 6px;
      border-radius: 10px;
    }
    
    /* 大图预览 */
    .photo-preview {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(0, 0, 0, 0.9);
      z-index: 1000;
      display: none;
      justify-content: center;
      align-items: center;
    }
    
    .photo-preview.active {
      display: flex;
    }
    
    .preview-image {
      max-width: 100%;
      max-height: 80vh;
      object-fit: contain;
    }
    
    .preview-close {
      position: absolute;
      top: 20px;
      right: 20px;
      color: white;
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
    }
    
    .preview-nav {
      position: absolute;
      top: 50%;
      width: 100%;
      display: flex;
      justify-content: space-between;
      padding: 0 10px;
      box-sizing: border-box;
    }
    
    .preview-btn {
      color: white;
      background: none;
      border: none;
      font-size: 30px;
      cursor: pointer;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background-color: rgba(0, 0, 0, 0.3);
    }
    
    .preview-info {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
      color: white;
      padding: 20px;
    }
    
    .preview-caption {
      font-size: 16px;
      margin-bottom: 5px;
    }
    
    .preview-date {
      font-size: 13px;
      opacity: 0.8;
    }
    
    /* 样式切换器 */
    .style-switcher {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1010;
      background-color: white;
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      width: 180px;
      transition: all 0.3s ease;
      transform: translateX(0);
      opacity: 1;
    }
    
    .style-switcher.hidden {
      transform: translateX(200px);
      opacity: 0;
      pointer-events: none;
    }
    
    .switcher-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1020;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      border: none;
      font-size: 18px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .switcher-header {
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 600;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .switcher-close {
      background: none;
      border: none;
      color: var(--secondary);
      font-size: 16px;
      cursor: pointer;
    }
    
    .switcher-option {
      padding: 12px 16px;
      font-size: 14px;
      cursor: pointer;
      transition: background-color 0.2s;
      display: flex;
      align-items: center;
    }
    
    .switcher-color {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-right: 10px;
    }
    
    .switcher-option:hover {
      background-color: #f9f9f9;
    }
    
    .switcher-option.active {
      background-color: var(--primary);
      color: white;
    }
    
    /* 相册操作栏 */
    .album-actions {
      display: flex;
      padding: 12px 20px;
      border-top: 1px solid var(--border);
      background-color: var(--white);
    }
    
    .action-button {
      flex: 1;
      background: none;
      border: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: var(--secondary);
      font-size: 12px;
      gap: 5px;
      padding: 5px 0;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .action-button i {
      font-size: 18px;
    }
    
    .action-button:hover {
      color: var(--primary);
    }
    
    /* 风格1：科技蓝 */
    .style-1 {
      --primary: var(--style1);
    }
    
    .style-1 .photo-item {
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .style-1 .photo-item:hover {
      transform: scale(1.03);
      z-index: 10;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    /* 风格2：活力粉 */
    .style-2 {
      --primary: var(--style2);
    }
    
    .style-2 .page-header {
      background-color: var(--primary);
      color: white;
      border-bottom: none;
    }
    
    .style-2 .header-btn,
    .style-2 .back-btn {
      color: white;
    }
    
    .style-2 .photos-grid {
      gap: 4px;
    }
    
    .style-2 .photo-item {
      border-radius: 8px;
    }
    
    /* 风格3：生态绿 */
    .style-3 {
      --primary: var(--style3);
    }
    
    .style-3 .container {
      background-color: #F8FAFC;
    }
    
    .style-3 .album-info {
      background-color: var(--white);
      margin: 10px;
      border-radius: 10px;
      border-bottom: none;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
    
    .style-3 .photos-grid {
      padding: 10px;
      gap: 4px;
    }
    
    .style-3 .photo-item {
      border-radius: 6px;
    }
    
    /* 风格4：温暖橙 */
    .style-4 {
      --primary: var(--style4);
    }
    
    .style-4 .album-title {
      color: var(--primary);
      font-weight: 700;
    }
    
    .style-4 .owner-avatar {
      box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
    }
    
    .style-4 .action-button.active {
      color: var(--primary);
    }
    
    .style-4 .photos-grid {
      gap: 3px;
    }
    
    .style-4 .photo-item {
      border: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    /* 风格5：梦幻紫 */
    .style-5 {
      --primary: var(--style5);
    }
    
    .style-5 .container {
      background-color: #FCFAFF;
    }
    
    .style-5 .album-title {
      color: var(--primary);
    }
    
    .style-5 .photos-grid {
      gap: 6px;
      padding: 6px;
    }
    
    .style-5 .photo-item {
      border-radius: 12px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    
    /* 风格6：商务黑 */
    .style-6 {
      --primary: #60A5FA;
      --secondary: #9CA3AF;
      --light: #1F2937;
      --dark: #F9FAFB;
      --white: #111827;
      --border: #374151;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .style-6 body {
      background-color: #030712;
    }
    
    .style-6 .container {
      background-color: var(--white);
    }
    
    .style-6 .page-header {
      background-color: var(--light);
      border-bottom-color: var(--border);
    }
    
    .style-6 .header-btn,
    .style-6 .back-btn,
    .style-6 .page-title {
      color: var(--dark);
    }
    
    .style-6 .album-info {
      border-bottom-color: var(--border);
    }
    
    .style-6 .photos-grid {
      background-color: var(--light);
    }
    
    .style-6 .style-switcher {
      background-color: var(--light);
    }
    
    .style-6 .switcher-header {
      border-bottom-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .switcher-option {
      color: var(--dark);
    }
    
    .style-6 .switcher-option:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }
    
    .style-6 .album-actions {
      background-color: var(--light);
      border-top-color: var(--border);
    }
    
    /* 动画效果 */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    .loading {
      animation: spin 1s linear infinite;
    }
    
    /* 响应式调整 */
    @media (max-width: 360px) {
      .album-title {
        font-size: 18px;
      }
      
      .action-button i {
        font-size: 16px;
      }
      
      .action-button {
        font-size: 11px;
      }
    }
  </style>
</head>
<body class="style-1">
  <!-- 样式切换器 -->
  <button class="switcher-toggle">
    <i class="fa fa-paint-brush"></i>
  </button>
  
  <div class="style-switcher hidden">
    <div class="switcher-header">
      选择页面样式
      <button class="switcher-close"><i class="fa fa-times"></i></button>
    </div>
    <div class="switcher-option active" data-style="1">
      <span class="switcher-color" style="background-color: var(--style1);"></span>
      科技蓝
    </div>
    <div class="switcher-option" data-style="2">
      <span class="switcher-color" style="background-color: var(--style2);"></span>
      活力粉
    </div>
    <div class="switcher-option" data-style="3">
      <span class="switcher-color" style="background-color: var(--style3);"></span>
      生态绿
    </div>
    <div class="switcher-option" data-style="4">
      <span class="switcher-color" style="background-color: var(--style4);"></span>
      温暖橙
    </div>
    <div class="switcher-option" data-style="5">
      <span class="switcher-color" style="background-color: var(--style5);"></span>
      梦幻紫
    </div>
    <div class="switcher-option" data-style="6">
      <span class="switcher-color" style="background-color: var(--style6);"></span>
      商务黑
    </div>
  </div>
  
  <div class="container">
    <!-- 风格1：科技蓝相册页 -->
    <div class="album-page active" id="album1">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">相册详情</h1>
        <div class="header-actions">
          <button class="header-btn" id="share1"><i class="fa fa-share-alt"></i></button>
          <button class="header-btn" id="more1"><i class="fa fa-ellipsis-v"></i></button>
        </div>
      </div>
      
      <div class="album-info">
        <h2 class="album-title">夏日海边旅行</h2>
        <div class="album-meta">
          <span><i class="fa fa-camera"></i> 24张照片</span>
          <span>2023年7月15日</span>
        </div>
        <p class="album-description">
          夏日海边的美好回忆，阳光、沙滩、海浪，还有和朋友们的欢声笑语。这是一次难忘的旅行，记录下每一个精彩瞬间。
        </p>
        <div class="album-owner">
          <div class="owner-avatar">李</div>
          <div class="owner-name">李明</div>
        </div>
      </div>
      
      <div class="photos-container">
        <div class="photos-grid" id="grid1">
          <!-- 照片会通过JS动态生成 -->
        </div>
      </div>
      
      <div class="album-actions">
        <button class="action-button">
          <i class="fa fa-heart-o"></i>
          <span>喜欢</span>
        </button>
        <button class="action-button">
          <i class="fa fa-comment-o"></i>
          <span>评论</span>
        </button>
        <button class="action-button">
          <i class="fa fa-bookmark-o"></i>
          <span>收藏</span>
        </button>
        <button class="action-button">
          <i class="fa fa-download"></i>
          <span>保存</span>
        </button>
      </div>
    </div>
    
    <!-- 风格2：活力粉相册页 -->
    <div class="album-page" id="album2">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">相册详情</h1>
        <div class="header-actions">
          <button class="header-btn" id="share2"><i class="fa fa-share-alt"></i></button>
          <button class="header-btn" id="more2"><i class="fa fa-ellipsis-v"></i></button>
        </div>
      </div>
      
      <div class="album-info">
        <h2 class="album-title">闺蜜下午茶时光</h2>
        <div class="album-meta">
          <span><i class="fa fa-camera"></i> 18张照片</span>
          <span>2023年6月2日</span>
        </div>
        <p class="album-description">
          和闺蜜们的下午茶聚会，精致的甜点，轻松的聊天，记录下这些美好的女孩时光。
        </p>
        <div class="album-owner">
          <div class="owner-avatar">张</div>
          <div class="owner-name">张婷</div>
        </div>
      </div>
      
      <div class="photos-container">
        <div class="photos-grid" id="grid2">
          <!-- 照片会通过JS动态生成 -->
        </div>
      </div>
      
      <div class="album-actions">
        <button class="action-button">
          <i class="fa fa-heart-o"></i>
          <span>喜欢</span>
        </button>
        <button class="action-button">
          <i class="fa fa-comment-o"></i>
          <span>评论</span>
        </button>
        <button class="action-button">
          <i class="fa fa-bookmark-o"></i>
          <span>收藏</span>
        </button>
        <button class="action-button">
          <i class="fa fa-download"></i>
          <span>保存</span>
        </button>
      </div>
    </div>
    
    <!-- 风格3：生态绿相册页 -->
    <div class="album-page" id="album3">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">相册详情</h1>
        <div class="header-actions">
          <button class="header-btn" id="share3"><i class="fa fa-share-alt"></i></button>
          <button class="header-btn" id="more3"><i class="fa fa-ellipsis-v"></i></button>
        </div>
      </div>
      
      <div class="album-info">
        <h2 class="album-title">森林徒步探险</h2>
        <div class="album-meta">
          <span><i class="fa fa-camera"></i> 32张照片</span>
          <span>2023年5月18日</span>
        </div>
        <p class="album-description">
          深入原始森林，探索大自然的奥秘，呼吸新鲜空气，感受自然的生命力与美好。
        </p>
        <div class="album-owner">
          <div class="owner-avatar">王</div>
          <div class="owner-name">王伟</div>
        </div>
      </div>
      
      <div class="photos-container">
        <div class="photos-grid" id="grid3">
          <!-- 照片会通过JS动态生成 -->
        </div>
      </div>
      
      <div class="album-actions">
        <button class="action-button">
          <i class="fa fa-heart-o"></i>
          <span>喜欢</span>
        </button>
        <button class="action-button">
          <i class="fa fa-comment-o"></i>
          <span>评论</span>
        </button>
        <button class="action-button">
          <i class="fa fa-bookmark-o"></i>
          <span>收藏</span>
        </button>
        <button class="action-button">
          <i class="fa fa-download"></i>
          <span>保存</span>
        </button>
      </div>
    </div>
    
    <!-- 风格4：温暖橙相册页 -->
    <div class="album-page" id="album4">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">相册详情</h1>
        <div class="header-actions">
          <button class="header-btn" id="share4"><i class="fa fa-share-alt"></i></button>
          <button class="header-btn" id="more4"><i class="fa fa-ellipsis-v"></i></button>
        </div>
      </div>
      
      <div class="album-info">
        <h2 class="album-title">家庭美食聚会</h2>
        <div class="album-meta">
          <span><i class="fa fa-camera"></i> 26张照片</span>
          <span>2023年4月29日</span>
        </div>
        <p class="album-description">
          家人人团聚，一起动手做的丰盛晚餐，满满的幸福感。记录下这些美味瞬间和温馨时刻。
        </p>
        <div class="album-owner">
          <div class="owner-avatar">刘</div>
          <div class="owner-name">刘洋</div>
        </div>
      </div>
      
      <div class="photos-container">
        <div class="photos-grid" id="grid4">
          <!-- 照片会通过JS动态生成 -->
        </div>
      </div>
      
      <div class="album-actions">
        <button class="action-button">
          <i class="fa fa-heart-o"></i>
          <span>喜欢</span>
        </button>
        <button class="action-button">
          <i class="fa fa-comment-o"></i>
          <span>评论</span>
        </button>
        <button class="action-button">
          <i class="fa fa-bookmark-o"></i>
          <span>收藏</span>
        </button>
        <button class="action-button">
          <i class="fa fa-download"></i>
          <span>保存</span>
        </button>
      </div>
    </div>
    
    <!-- 风格5：梦幻紫紫相册相册页 -->
    <div class="album-page" id="album5">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">相册详情</h1>
        <div class="header-actions">
          <button class="header-btn" id="share5"><i class="fa fa-share-alt"></i></button>
          <button class="header-btn" id="more5"><i class="fa fa-ellipsis-v"></i></button>
        </div>
      </div>
      
      <div class="album-info">
        <h2 class="album-title">城市夜景摄影</h2>
        <div class="album-meta">
          <span><i class="fa fa-camera"></i> 21张照片</span>
          <span>2023年3月12日</span>
        </div>
        <p class="album-description">
          城市的夜晚有着不同于白天的魅力，华灯初上，霓虹闪烁，记录下这座城市的夜晚脉搏。
        </p>
        <div class="album-owner">
          <div class="owner-avatar">陈</div>
          <div class="owner-name">陈明</div>
        </div>
      </div>
      
      <div class="photos-container">
        <div class="photos-grid" id="grid5">
          <!-- 照片会通过JS动态生成 -->
        </div>
      </div>
      
      <div class="album-actions">
        <button class="action-button">
          <i class="fa fa-heart-o"></i>
          <span>喜欢</span>
        </button>
        <button class="action-button">
          <i class="fa fa-comment-o"></i>
          <span>评论</span>
        </button>
        <button class="action-button">
          <i class="fa fa-bookmark-o"></i>
          <span>收藏</span>
        </button>
        <button class="action-button">
          <i class="fa fa-download"></i>
          <span>保存</span>
        </button>
      </div>
    </div>
    
    <!-- 风格6：商务黑相册页 -->
    <div class="album-page" id="album6">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">相册详情</h1>
        <div class="header-actions">
          <button class="header-btn" id="share6"><i class="fa fa-share-alt"></i></button>
          <button class="header-btn" id="more6"><i class="fa fa-ellipsis-v"></i></button>
        </div>
      </div>
      
      <div class="album-info">
        <h2 class="album-title">设计作品合集</h2>
        <div class="album-meta">
          <span><i class="fa fa-camera"></i> 17张照片</span>
          <span>2023年2月5日</span>
        </div>
        <p class="album-description">
          近期完成的设计项目合集，包括UI设计、品牌设计和平面设计作品，记录设计思路与成果。
        </p>
        <div class="album-owner">
          <div class="owner-avatar">赵</div>
          <div class="owner-name">赵杰</div>
        </div>
      </div>
      
      <div class="photos-container">
        <div class="photos-grid" id="grid6">
          <!-- 照片会通过JS动态生成 -->
        </div>
      </div>
      
      <div class="album-actions">
        <button class="action-button">
          <i class="fa fa-heart-o"></i>
          <span>喜欢</span>
        </button>
        <button class="action-button">
          <i class="fa fa-comment-o"></i>
          <span>评论</span>
        </button>
        <button class="action-button">
          <i class="fa fa-bookmark-o"></i>
          <span>收藏</span>
        </button>
        <button class="action-button">
          <i class="fa fa-download"></i>
          <span>保存</span>
        </button>
      </div>
    </div>
  </div>
  
  <!-- 照片预览模态框 -->
  <div class="photo-preview" id="photoPreview">
    <button class="preview-close"><i class="fa fa-times"></i></button>
    <div class="preview-nav">
      <button class="preview-btn prev-btn"><i class="fa fa-angle-left"></i></button>
      <button class="preview-btn next-btn"><i class="fa fa-angle-right"></i></button>
    </div>
    <img src="" alt="照片预览" class="preview-image" id="previewImage">
    <div class="preview-info">
      <div class="preview-caption" id="previewCaption"></div>
      <div class="preview-date" id="previewDate"></div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 当前状态
    let currentStyle = 1;
    let currentPhotoIndex = 0;
    let currentPhotos = [];
    
    // 相册数据 - 不同风格的相册照片
    const albumData = {
      1: {
        photos: [
          { id: 1015, caption: "海边日落", date: "2023-07-15 18:30" },
          { id: 1016, caption: "沙滩漫步", date: "2023-07-15 16:45" },
          { id: 1018, caption: "海浪拍打岩石", date: "2023-07-15 15:20" },
          { id: 1019, caption: "沙滩上的脚印", date: "2023-07-15 10:15" },
          { id: 1022, caption: "海上日出", date: "2023-07-16 06:10" },
          { id: 1023, caption: "海边小屋", date: "2023-07-16 09:30" },
          { id: 1024, caption: "渔船帆点点", date: "2023-07-16 14:20" },
          { id: 1025, caption: "沙滩排球", date: "2023-07-16 16:05" },
          { id: 1039, caption: "海边烧烤", date: "2023-07-16 19:45" },
          { id: 1040, caption: "星空下的海滩", date: "2023-07-16 22:10" },
          { id: 1043, caption: "海边栈道", date: "2023-07-17 08:40" },
          { id: 1054, caption: "渔船上冲浪", date: "2023-07-17 11:20" }
        ]
      },
      2: {
        photos: [
          { id: 292, caption: "精致致甜点", date: "2023-06-02 14:30" },
          { id: 293, caption: "下午茶时光", date: "2023-06-02 15:10" },
          { id: 294, caption: "闺蜜合影", date: "2023-06-02 15:30" },
          { id: 295, caption: "咖啡与书", date: "2023-06-02 16:05" },
          { id: 296, caption: "窗外街景", date: "2023-06-02 16:20" },
          { id: 297, caption: "蛋糕特写", date: "2023-06-02 14:45" },
          { id: 298, caption: "水果拼盘", date: "2023-06-02 14:50" },
          { id: 299, caption: "聊天时刻", date: "2023-06-02 15:45" },
          { id: 300, caption: "精致茶具", date: "2023-06-02 14:20" }
        ]
      },
      3: {
        photos: [
          { id: 118, caption: "森林小径", date: "2023-05-18 09:30" },
          { id: 119, caption: "山间溪流", date: "2023-05-18 10:45" },
          { id: 120, caption: "茂密树林", date: "2023-05-18 11:20" },
          { id: 121, caption: "林间阳光", date: "2023-05-18 12:10" },
          { id: 122, caption: "野生蘑菇", date: "2023-05-18 13:45" },
          { id: 123, caption: "山顶风景", date: "2023-05-18 15:30" },
          { id: 124, caption: "古树参天", date: "2023-05-18 10:15" },
          { id: 125, caption: "徒步装备", date: "2023-05-18 08:40" },
          { id: 126, caption: "山间野花", date: "2023-05-18 14:20" },
          { id: 127, caption: "森林动物", date: "2023-05-18 16:10" },
          { id: 128, caption: "山顶云海", date: "2023-05-18 15:45" },
          { id: 129, caption: "山间小屋", date: "2023-05-18 17:30" }
        ]
      },
      4: {
        photos: [
          { id: 292, caption: "丰盛晚餐", date: "2023-04-29 18:30" },
          { id: 293, caption: "自制披萨", date: "2023-04-29 17:15" },
          { id: 294, caption: "水果沙拉", date: "2023-04-29 16:40" },
          { id: 295, caption: "烘焙面包", date: "2023-04-29 15:20" },
          { id: 296, caption: "家人合影", date: "2023-04-29 19:10" },
          { id: 297, caption: "手工饺子", date: "2023-04-29 14:30" },
          { id: 298, caption: "餐后甜点", date: "2023-04-29 20:05" },
          { id: 299, caption: "准备食材", date: "2023-04-29 13:45" },
          { id: 300, caption: "美酒相伴", date: "2023-04-29 18:45" }
        ]
      },
      5: {
        photos: [
          { id: 42, caption: "城市天际线", date: "2023-03-12 19:30" },
          { id: 43, caption: "桥梁夜景", date: "2023-03-12 20:15" },
          { id: 44, caption: "霓虹灯光", date: "2023-03-12 20:40" },
          { id: 45, caption: "夜市小吃", date: "2023-03-12 21:10" },
          { id: 46, caption: "高楼夜景", date: "2023-03-12 19:45" },
          { id: 47, caption: "街道路灯", date: "2023-03-12 21:30" },
          { id: 48, caption: "商场夜景", date: "2023-03-12 20:05" },
          { id: 49, caption: "夜间车流", date: "2023-03-12 21:45" },
          { id: 50, caption: "建筑灯光秀", date: "2023-03-12 19:15" }
        ]
      },
      6: {
        photos: [
          { id: 201, caption: "UI设计作品", date: "2023-02-05 10:30" },
          { id: 202, caption: "品牌logo设计", date: "2023-02-05 11:15" },
          { id: 203, caption: "海报设计", date: "2023-02-05 13:40" },
          { id: 204, caption: "包装设计", date: "2023-02-05 14:20" },
          { id: 205, caption: "网站原型", date: "2023-02-05 09:45" },
          { id: 206, caption: "APP界面", date: "2023-02-05 15:30" },
          { id: 207, caption: "字体设计", date: "2023-02-05 16:05" },
          { id: 208, caption: "设计草图", date: "2023-02-05 08:45" }
        ]
      }
    };
    
    // DOM元素
    const switcherToggle = document.querySelector('.switcher-toggle');
    const switcher = document.querySelector('.style-switcher');
    const switcherClose = document.querySelector('.switcher-close');
    const switcherOptions = document.querySelectorAll('.switcher-option');
    const albumPages = {
      1: document.getElementById('album1'),
      2: document.getElementById('album2'),
      3: document.getElementById('album3'),
      4: document.getElementById('album4'),
      5: document.getElementById('album5'),
      6: document.getElementById('album6')
    };
    const grids = {
      1: document.getElementById('grid1'),
      2: document.getElementById('grid2'),
      3: document.getElementById('grid3'),
      4: document.getElementById('grid4'),
      5: document.getElementById('grid5'),
      6: document.getElementById('grid6')
    };
    const bodyElement = document.body;
    const photoPreview = document.getElementById('photoPreview');
    const previewImage = document.getElementById('previewImage');
    const previewCaption = document.getElementById('previewCaption');
    const previewDate = document.getElementById('previewDate');
    const previewClose = document.querySelector('.preview-close');
    const prevBtn = document.querySelector('.prev-btn');
    const nextBtn = document.querySelector('.next-btn');
    
    // 初始化
    function init() {
      // 生成所有相册的照片网格
      for (let i = 1; i <= 6; i++) {
        generatePhotoGrid(i);
      }
      
      // 切换器控制
      switcherToggle.addEventListener('click', toggleSwitcher);
      switcherClose.addEventListener('click', toggleSwitcher);
      
      // 切换样式
      switcherOptions.forEach(option => {
        option.addEventListener('click', function() {
          const style = parseInt(this.getAttribute('data-style'));
          switchStyle(style);
          toggleSwitcher();
        });
      });
      
      // 初始化所有页面的交互
      initPageInteractions();
      
      // 预览框控制
      previewClose.addEventListener('click', closePreview);
      prevBtn.addEventListener('click', showPrevPhoto);
      nextBtn.addEventListener('click', showNextPhoto);
      
      // 点击预览框背景关闭
      photoPreview.addEventListener('click', function(e) {
        if (e.target === photoPreview) {
          closePreview();
        }
      });
      
      // 键盘导航
      document.addEventListener('keydown', function(e) {
        if (photoPreview.classList.contains('active')) {
          if (e.key === 'Escape') {
            closePreview();
          } else if (e.key === 'ArrowLeft') {
            showPrevPhoto();
          } else if (e.key === 'ArrowRight') {
            showNextPhoto();
          }
        } else {
          if (e.key === 'ArrowLeft') {
            let prev = currentStyle - 1;
            if (prev < 1) prev = 6;
            switchStyle(prev);
          } else if (e.key === 'ArrowRight') {
            let next = currentStyle + 1;
            if (next > 6) next = 1;
            switchStyle(next);
          }
        }
      });
    }
    
    // 生成照片网格
    function generatePhotoGrid(style) {
      const grid = grids[style];
      const photos = albumData[style].photos;
      
      grid.innerHTML = '';
      
      photos.forEach((photo, index) => {
        const photoItem = document.createElement('div');
        photoItem.className = 'photo-item';
        photoItem.style.backgroundImage = `url('https://picsum.photos/id/${photo.id}/400/400')`;
        
        // 给超过9张的相册添加计数标记
        if (photos.length > 9 && index === 8) {
          photoItem.innerHTML = `<div class="photo-count">+${photos.length - 9}</div>`;
        }
        
        // 点击照片打开预览
        photoItem.addEventListener('click', function() {
          openPhotoPreview(style, index);
        });
        
        grid.appendChild(photoItem);
      });
    }
    
    // 打开照片预览
    function openPhotoPreview(style, index) {
      currentPhotos = albumData[style].photos;
      currentPhotoIndex = index;
      
      const photo = currentPhotos[currentPhotoIndex];
      previewImage.src = `https://picsum.photos/id/${photo.id}/800/1200`;
      previewCaption.textContent = photo.caption;
      previewDate.textContent = photo.date;
      
      photoPreview.classList.add('active');
      document.body.style.overflow = 'hidden'; // 防止背景滚动
    }
    
    // 关闭照片预览
    function closePreview() {
      photoPreview.classList.remove('active');
      document.body.style.overflow = ''; // 恢复滚动
    }
    
    // 显示上一张照片
    function showPrevPhoto() {
      currentPhotoIndex = (currentPhotoIndex - 1 + currentPhotos.length) % currentPhotos.length;
      const photo = currentPhotos[currentPhotoIndex];
      previewImage.src = `https://picsum.photos/id/${photo.id}/800/1200`;
      previewCaption.textContent = photo.caption;
      previewDate.textContent = photo.date;
    }
    
    // 显示下一张照片
    function showNextPhoto() {
      currentPhotoIndex = (currentPhotoIndex + 1) % currentPhotos.length;
      const photo = currentPhotos[currentPhotoIndex];
      previewImage.src = `https://picsum.photos/id/${photo.id}/800/1200`;
      previewCaption.textContent = photo.caption;
      previewDate.textContent = photo.date;
    }
    
    // 初始化页面交互
    function initPageInteractions() {
      // 为每个页面初始化交互
      for (let i = 1; i <= 6; i++) {
        // 返回按钮
        const backBtn = albumPages[i].querySelector('.back-btn');
        backBtn.addEventListener('click', function() {
          alert('返回相册列表');
        });
        
        // 分享按钮
        const shareBtn = document.getElementById(`share${i}`);
        shareBtn.addEventListener('click', function() {
          alert('分享此相册');
        });
        
        // 更多按钮
        const moreBtn = document.getElementById(`more${i}`);
        moreBtn.addEventListener('click', function() {
          alert('相册更多选项');
        });
        
        // 操作按钮
        const actionButtons = albumPages[i].querySelectorAll('.action-button');
        actionButtons.forEach(btn => {
          btn.addEventListener('click', function() {
            const action = this.querySelector('span').textContent;
            
            if (action === '喜欢') {
              this.classList.toggle('active');
              const icon = this.querySelector('i');
              if (this.classList.contains('active')) {
                icon.className = 'fa fa-heart';
              } else {
                icon.className = 'fa fa-heart-o';
              }
            } else if (action === '收藏') {
              this.classList.toggle('active');
              const icon = this.querySelector('i');
              if (this.classList.contains('active')) {
                icon.className = 'fa fa-bookmark';
              } else {
                icon.className = 'fa fa-bookmark-o';
              }
            } else if (action === '评论') {
              alert('查看评论');
            } else if (action === '保存') {
              alert('保存相册到本地');
            }
          });
        });
      }
    }
    
    // 切换样式选择器显示/隐藏
    function toggleSwitcher() {
      switcher.classList.toggle('hidden');
    }
    
    // 关闭所有页面
    function closeAllPages() {
      Object.values(albumPages).forEach(page => {
        page.classList.remove('active');
      });
    }
    
    // 切换样式
    function switchStyle(style) {
      // 移除所有样式类
      bodyElement.classList.remove('style-1', 'style-2', 'style-3', 'style-4', 'style-5', 'style-6');
      
      // 添加当前样式类
      bodyElement.classList.add(`style-${style}`);
      
      // 更新当前样式
      currentStyle = style;
      
      // 更新切换器选中状态
      switcherOptions.forEach(option => {
        option.classList.remove('active');
        if (parseInt(option.getAttribute('data-style')) === style) {
          option.classList.add('active');
        }
      });
      
      // 显示对应页面
      closeAllPages();
      albumPages[style].classList.add('active');
    }
    
    // 启动
    init();
  </script>
</body>
</html>
